<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="box"></div>
    <script type="text/html" id="tel">
        <div>姓名:{{name}}</div>
        <div>年纪:{{age}}</div>
        <div>荷尔蒙:{{gender}}</div>
        <div>性别:{{sex}}</div>
    </script>
    <script src="./js/template.js"></script>
    <script>
        var data = {
            name: 'ls',
            age: 22,
            gender: '雄性',
            sex: '男',
        }
        var ccc = template('tel', data)
        document.querySelector('#box').innerHTML=ccc
    </script>
</body>

</html>